package com.haiya.visitor.basic;

public class Client {
    public static void main(String[] args) {
        Element elementA = new ConcreteElementA();
        Element elementB = new ConcreteElementB();
        ObjectStructure structure = new ObjectStructure();
        structure.add(elementA);
        structure.add(elementB);

        Visitor visitorA = new ConcreteVisitorA();
        Visitor visitorB = new ConcreteVisitorB();

        structure.accept(visitorA);
        System.out.println("------------------------");
        structure.accept(visitorB);
    }
}